<?php
namespace app\run\model;

use think\Model;
use think\Db;
class Theme extends Model{

   public static function selects(){
   		$res = Db::name('theme')->where('state',1)->field('id,name')->select();
   		return $res;
   }
 	

 	public static function add(array $data){
 		$res = Db::name('theme')->insert($data);
 		return $res;
 	}

 	public static function find($where){
		$res = Db::name('theme')->where($where)->find();
		return $res;
	}
 
    public static function index(){
		$res = Db::name('theme')->where('state',1)->select();
		return $res;
	}

	public static function updates(array $data){
		$res = Db::name('theme')->update($data);
		return $res;
	}
	
}